#include "Move.h"
#include "Dot.h"

Move :: Move(Dot* dot)
{
	this->dot = dot;
}

void Move :: process(Uint8* keys)
{
	if(keys[SDLK_UP])
		moveUp();
	if(keys[SDLK_DOWN])
		moveDown();
	if(keys[SDLK_LEFT])
		moveLeft();
	if(keys[SDLK_RIGHT])
		moveRight();
}

void Move :: moveLeft()
{
	dot->moveLeft();
}

void Move :: moveRight()
{
	dot->moveRight();
}

void Move :: moveUp()
{
	dot->moveUp();
}

void Move :: moveDown()
{
	dot->moveDown();
}